<?php
/**
 * Created by PhpStorm.
 * User: LEEYOOL
 * Date: 15/01/19
 * Time: 22:55
 */
function echo_asset_css() {
    $css = array(
        'css/bootstrap',
        'css/reset',
        'css/fullcalendar',
        'css/datepicker'
    );
    foreach ($css as $item) {
        echo "<link rel='stylesheet' href='" . asset_url() . $item . ".css'/>\n";
    }
}

function echo_asset_js() {
    $js = array(
        'js/moment.min',
        'js/jquery',
        'js/bootstrap',
        'js/fullcalendar',
        'js/bootstrap-datepicker',
        'js/script'
    );
    foreach ($js as $item) {
        echo "<script src='" . asset_url() . $item . ".js'></script>\n";
    }
}

function echo_asset_url() {
    return base_url();
}
function asset_url() {
    return base_url() . 'assets/';
}

function echo_format_date($input, $format) {
    echo date($format, strtotime($input));
}